Electrics - automatic typing by Alpha

The term "electric" is used in the sense of "automatic, power assisted behavior", which is intended to save time, keystrokes, and brainpower. All the "electric" features are features, which makes Alpha do automatic typing for you. HTML modes electric preferences are set using Electrics in the Preferences submenu of the HTML menu.

Electric braces
Enabling Electric braces tells Alpha to treat the left or right brace '{', '}' keys as special keypresses which enter the '{' or '}' character, followed by a carriage return and then indent the following line correctly. In HTML mode the braces are only electric inside SCRIPT and STYLE elements. Outside SCRIPT and STYLE elements typing '{' or '}' simply inserts a '{' or a '}'. Note! For the electric braces to work you must select your keyboard in the dialog Config->Preferences->International.

Electric semicolon
Enabling Electric semicolon tells Alpha to treat the semicolon key ';' as special keypresses which enters the ';' character followed by a carriage return and then indents the following line correctly. The ';' key is context-dependent so you can still enter a for( ; ; ) loop in JavaScript code without Alpha messing things up. In HTML mode the semicolon is only electric inside SCRIPT and STYLE elements. Outside SCRIPT and STYLE elements typing ';' simply inserts a ';'.

Electric return
Enabling Electric return tells Alpha to indent the following line automatically whenever you press return.

Electric tab
Enabling Electric tab tells Alpha to treat tab as a special key. Typing tab either moves the insertion to the next template stop () or if there is no template stop indents the current line. To insert a tab character type opt-tab.

Auto-indent when typing > of a tag
This setting is found on page 2 in the dialog box General in the Preferences menu. I does not appear among the other electric preferences because it does not belong to the Alpha's global set of electrics. (It should perhaps be called "Electric greater".)

Enabling this feature will tell Alpha to indent the current line when you type the > of a HTML tag. This will make sure that the code is correctly indented when you simply type the code without using the menu items for HTML elements.

Previous page Table of contents Next page